import request from '../../utils/request'

/**
 * 分页查询航空公司
 *
 * @param aviation
 * @param page
 */
export async function getListForPage({ aviation, page }) {
	return request(apiPath.mc + "/api/aviation", {
		method: 'get',
		data: { aviation, page: page.page, size: page.size }
	});
}

/**
 * 根据id获取航空公司
 *
 * @param id
 */
export async function getAirCompanyById({ id }) {
	return request(apiPath.mc + "/api/aviation/" + id, {
		method: 'get'
	});
}

/**
 * 新增航空公司
 *
 * @param data
 */
export async function addAirCompany(data) {
	return request(apiPath.mc + "/api/aviation", {
		method: 'post',
		data
	});
}

/**
 * 更新航空公司
 *
 * @param data
 */
export async function updateAirCompany(data) {
	return request(apiPath.mc + "/api/aviation", {
		method: 'put',
		data
	});
}


/**
 * 根据id删除航空公司
 *
 * @param id
 */
export async function deleteAirCompanyById({ id }) {
	return request(apiPath.mc + "/api/aviation/" + id, {
		method: 'delete'
	});
}

/**
 * 查询航空公司List
 *
 */
export async function getAllAirCompanys(){
	return request(apiPath.mc + "/api/aviation/all",{
		method:'get'
	});
}
	